from django.contrib import admin
from django.urls import path,re_path, include
from django.views.static import serve
from django.conf import settings
import xadmin
xadmin.autodiscover()
from xadmin.plugins import xversion
xversion.register_models()

urlpatterns = [
    # path('admin/', admin.site.urls),
    #xadmin
    path(r'xadmin/', xadmin.site.urls),

    #media文件夹路径打开了
    re_path('media/(?P<path>.*)', serve, {'document_root':settings.MEDIA_ROOT}),
    #路由分发
    path('home/', include('home.urls')),
    path('user1/', include('user1.urls')),
    path('course/', include('course.urls')),
    path('order/', include('order.urls')),
]
